package cl.easyRestaurant.business.ventas;



import javax.ejb.Stateless;


import cl.easyRestaurant.dataAccess.persistence.FormaPago;
import cl.easyRestaurant.dataAccess.persistence.FormaPagoHome;
import cl.easyRestaurant.dataAccess.persistence.Ventas;
import cl.easyRestaurant.dataAccess.persistence.VentasHome;


@Stateless
public class FPagoBusiness implements IFPagoBusiness {

	/*@Override
	public DataModel<FPagoModel> GetFPagoModel(){
		
		FormaPagoHome fPagoHome = new FormaPagoHome();
		
		DataModel<FPagoModel> formasPago = new ListDataModel<FPagoModel>();
		
		List<FormaPago> result = fPagoHome.getAll();
		
		List<FPagoModel> data = new ArrayList<FPagoModel>(result.size());
		
		for(FormaPago fp : result){
			FPagoModel fpagoModel = this.toFPagoMode(fp);
			data.add(fpagoModel);
		}
		
		formasPago.setWrappedData(data);
		
		return formasPago;
		
	}*/
	
	@Override
	public FormaPago GetFPagoModel(String idFPago){
		FormaPagoHome fpagoHome = new FormaPagoHome();
		FormaPago result = fpagoHome.findById(idFPago);
		FormaPago fPago = new FormaPago();
		fPago.setIdForma(result.getIdForma());
		fPago.setGlosaForma(result.getGlosaForma());
		return fPago;
	}

}
